function countDown(time,id){
  var activeImg=[
  '../images/2017GuoHuoJie/top-nav-pc/time1.png',
  '../images/2017GuoHuoJie/top-nav-pc/time2.png',
  '../images/2017GuoHuoJie/top-nav-pc/time3.png',
  '../images/2017GuoHuoJie/top-nav-pc/time4.png'
  ];
	var day_elem = $(id).find('.day');
	var hour_elem = $(id).find('.hour');
	var minute_elem = $(id).find('.minute');
	var second_elem = $(id).find('.second');
	var end_time = new Date(time).getTime(),//月份是实际月份-1
	sys_second = (end_time-new Date().getTime())/1000;
	var timer = setInterval(function(){
		if (sys_second > 1) {
			sys_second -= 1;
			var day = Math.floor((sys_second / 3600) / 24);
			var hour = Math.floor((sys_second / 3600) % 24);
			var minute = Math.floor((sys_second / 60) % 60);
			var second = Math.floor(sys_second % 60);
			$(day_elem).text(day<10?"0"+day:day);//计算天
			//day_elem && $(day_elem).text(day);
			$(hour_elem).text(hour<10?"0"+hour:hour);//计算小时
			$(minute_elem).text(minute<10?"0"+minute:minute);//计算分钟
			$(second_elem).text(second<10?"0"+second:second);//计算秒杀
		} else {
			clearInterval(timer);
			// $(id).hide();
			$('.activity-time img').attr('src',activeImg[3]);
			$('.time-link-1').css('display','block');
			$('.time-link-2').css('display','block');
			$('.time-link-3').css('display','block');
			$('.time-link-4').css('display','block');
		}
	}, 1000);
}

$(function(){
	countDown("2017/07/19 00:00:00","#colockbox1");
})